* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 初始化指示器样式 */
.initialization-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.5); /* 改为50%透明度 */
    backdrop-filter: blur(3px); /* 减少模糊效果 */
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.init-content {
    text-align: center;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95); /* 内容区域保持较高不透明度 */
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15); /* 增强阴影效果 */
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 400px;
    width: 90%;
    backdrop-filter: blur(10px); /* 内容区域单独模糊 */
}

.init-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196f3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.init-text h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.init-text p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.init-progress {
    width: 100%;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 20px;
}

.init-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2196f3, #21cbf3);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: 200px 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .init-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .init-spinner {
        width: 50px;
        height: 50px;
    }
    
    .init-text h3 {
        font-size: 18px;
    }
    
    .init-text p {
        font-size: 13px;
    }
}

/* 文件管理样式 */
.file-management-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

/* 文件表格样式 */
.files-table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
}

.files-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 1200px; /* 确保表格有足够宽度显示所有列 */
}

.files-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.files-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.files-table tbody tr {
    transition: background-color 0.2s ease;
}

.files-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.files-table tbody tr:hover {
    background-color: #e3f2fd;
}

.files-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.file-name-cell {
    max-width: 300px;
    min-width: 200px;
}

.file-name-content {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.file-name {
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.file-path-small {
    color: #666;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-date {
    min-width: 120px;
    color: #666;
}

.file-type {
    min-width: 80px;
    color: #555;
    font-weight: 500;
}

.file-size {
    min-width: 80px;
    color: #666;
    text-align: right;
}

.file-duration,
.file-orientation,
.file-width,
.file-height,
.file-bitrate {
    min-width: 80px;
    text-align: center;
    color: #555;
}

.file-actions {
    min-width: 60px;
    text-align: center;
}

.file-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .files-table {
        min-width: 1000px;
    }
    
    .files-table th,
    .files-table td {
        padding: 8px 6px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .files-table-container {
        margin: 10px -15px;
        border-radius: 0;
    }
    
    .files-table {
        min-width: 800px;
    }
    
    .files-table th,
    .files-table td {
        padding: 6px 4px;
        font-size: 12px;
    }
    
    .file-name-cell {
        max-width: 200px;
        min-width: 150px;
    }
}

.file-mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.file-mode-selector .mode-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: white;
    border: 2px solid #e0e0e0;
    min-width: 150px;
    justify-content: center;
}

.file-mode-selector .mode-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.file-mode-selector .mode-option input[type="radio"] {
    display: none;
}

.file-mode-selector .mode-option input[type="radio"]:checked + .mode-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.file-mode-selector .mode-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.downloads-management,
.outputs-management,
.backgrounds-management {
    background: #fafafa;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e0e0e0;
}

.downloads-management h4,
.outputs-management h4,
.backgrounds-management h4 {
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 背景图管理特有样式 */
.background-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.background-stats {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background: #f0f8ff;
    border-radius: 6px;
    border: 1px solid #e3f2fd;
    flex-wrap: wrap;
}

.background-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1976d2;
    font-weight: 500;
    font-size: 0.9rem;
}

.background-stats .stat-item i {
    color: #2196f3;
}

.backgrounds-list {
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: white;
}

.background-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
}

.background-item:last-child {
    border-bottom: none;
}

.background-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.background-thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 6px;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    margin-right: 1rem;
    flex-shrink: 0;
}

.background-info {
    flex: 1;
    min-width: 0;
}

.background-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.background-details {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.background-detail {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.background-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.background-actions .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    min-width: auto;
}

.no-backgrounds {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
    font-style: italic;
}

.no-backgrounds::before {
    content: "🖼️";
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .file-mode-selector {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .file-mode-selector .mode-option {
        min-width: auto;
    }
    
    .downloads-management,
    .outputs-management,
    .backgrounds-management {
        padding: 1rem;
    }
    
    .background-controls {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .background-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .background-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .background-thumbnail {
        width: 100%;
        height: 120px;
        margin-right: 0;
    }
    
    .background-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .background-actions {
        width: 100%;
        justify-content: space-between;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.header-left {
    flex: 1;
    text-align: center;
}

.header-right {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.restart-btn {
    background: rgba(255, 87, 34, 0.1);
    border: 2px solid rgba(255, 87, 34, 0.3);
    color: #ff5722;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 10px;
}

.restart-btn:hover {
    background: rgba(255, 87, 34, 0.2);
    border-color: rgba(255, 87, 34, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
    color: #fff;
}

.restart-btn:active {
    transform: translateY(0);
}

.restart-btn.restarting {
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.5);
    color: #ffc107;
    pointer-events: none;
}

.restart-btn.restarting i {
    animation: spin 1s linear infinite;
}

.settings-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.settings-btn:active {
    transform: translateY(0);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.status-bar {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.2);
}

.status-item {
    color: white;
    font-weight: 500;
}

.main-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.download-section {
    margin-bottom: 40px;
}

/* 应用模式选择器 */
.app-mode-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.app-mode-selector .mode-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    color: white;
}

.app-mode-selector .mode-option:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.app-mode-selector .mode-option input[type="radio"] {
    display: none;
}

.app-mode-selector .mode-option input[type="radio"]:checked + .mode-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.app-mode-selector .mode-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: transparent;
}

.app-mode-selector .mode-label i {
    font-size: 1.1rem;
}

/* 下载模式选择器 */
.mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.mode-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.mode-option:hover {
    background: #e9ecef;
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-option input[type="radio"]:checked + .mode-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.mode-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mode-label i {
    font-size: 1.1rem;
}

/* 批量下载区域 */
.batch-download {
    animation: fadeIn 0.3s ease;
}

.batch-download textarea {
    width: 100%;
    min-height: 150px;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.batch-download textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.batch-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.batch-info span {
    font-weight: 600;
    color: #495057;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
}

.batch-options {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.batch-options .input-group {
    margin-bottom: 1.5rem;
}

.batch-options .input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.batch-options .input-group input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease;
}

.batch-options .input-group input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.batch-options .input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

.batch-options .input-hint i {
    margin-right: 0.25rem;
    color: #667eea;
}

.concurrent-options {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.concurrent-options label {
    font-weight: 500;
    color: #495057;
}

.concurrent-options select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: white;
}

/* 批量信息显示 */
.batch-info-section {
    animation: fadeIn 0.3s ease;
}

.batch-summary {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    border-radius: 8px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.summary-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.summary-item span:last-child {
    font-size: 1.5rem;
    font-weight: bold;
}

.batch-video-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.batch-video-item {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.batch-video-item:last-child {
    border-bottom: none;
}

.batch-video-item.valid {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.batch-video-item.invalid {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.batch-video-item.loading {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.video-status {
    font-size: 1.2rem;
}

.video-details h5 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
}

.video-details p {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
}

/* 批量下载进度 */
.batch-progress-section {
    animation: fadeIn 0.3s ease;
}

.overall-progress {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.current-downloads {
    margin-bottom: 1.5rem;
}

.current-download-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-left: 4px solid #007bff;
}

.current-download-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.current-download-title {
    font-weight: 600;
    color: #333;
}

.current-download-status {
    font-size: 0.8rem;
    color: #666;
}

.download-queue {
    margin-bottom: 1.5rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
}

.download-queue h4 {
    margin: 0 0 1rem 0;
    color: #495057;
}

.queue-list {
    max-height: 200px;
    overflow-y: auto;
}

.queue-item {
    padding: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.queue-item:last-child {
    border-bottom: none;
}

.queue-item .queue-index {
    background: #6c757d;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
}

.batch-log {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
}

.batch-log h4 {
    margin: 0 0 1rem 0;
    color: #495057;
}

.batch-log .log-container {
    max-height: 300px;
}

.input-group {
    margin-bottom: 25px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.option-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.option-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.option-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* 预设别名选择器样式 */
.preset-alias-group {
    margin-bottom: 20px;
}

.preset-alias-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.preset-alias-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.preset-alias-group select:focus {
    outline: none;
    border-color: #667eea;
}

.preset-alias-hint {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.subtitle-options {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* 字幕显示模式信息样式 */
.display-mode-info {
    margin: 15px 0;
    padding: 12px 16px;
    background: #f0f8ff;
    border: 1px solid #d1ecf1;
    border-radius: 6px;
    font-size: 14px;
}

.display-mode-info .mode-info {
    display: none;
    color: #0c5460;
}

.display-mode-info .mode-info.active {
    display: block;
}

.display-mode-info .mode-info span {
    font-weight: 500;
}

.display-mode-info .mode-info strong {
    color: #155724;
    font-weight: 600;
}

.display-mode-info small {
    display: block;
    margin-top: 4px;
    color: #6c757d;
    font-size: 12px;
}

/* 频率输入组样式 */
.frequency-input-group {
    margin: 10px 0;
}

.frequency-input-group input[type="number"] {
    width: 80px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-right: 10px;
}

.frequency-presets {
    display: inline-flex;
    gap: 6px;
    margin-left: 10px;
}

.preset-btn {
    padding: 4px 12px;
    border: 1px solid #007bff;
    background: #fff;
    color: #007bff;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: #007bff;
    color: #fff;
}

.preset-btn.active {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
    transform: scale(1.05);
}

/* 按钮组样式 */
.button-group {
    margin: 1rem 0;
}

.single-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.batch-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.batch-buttons button {
    margin-bottom: 0.5rem;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.info-section, .progress-section, .downloads-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e1e5e9;
}

.info-section h3, .progress-section h3, .downloads-section h3 {
    margin-bottom: 20px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-info-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #28a745;
}

.video-info-item {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.video-info-item strong {
    min-width: 100px;
    color: #555;
}

/* 批量视频信息中的额外信息样式 */
.video-additional-info {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    padding: 5px 10px;
    background: #f0f8ff;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e1e5e9;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    width: 0%;
    transition: width 0.3s ease;
}

/* 处理完成时的绿色样式 */
.progress-fill.completed {
    background: linear-gradient(90deg, #28a745, #34ce57) !important;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.3);
}

.progress-text.completed {
    color: #28a745 !important;
    font-weight: 600;
}

.progress-text {
    font-weight: 500;
    color: #555;
    margin-bottom: 15px;
}

.log-container {
    background: #1a1a1a;
    color: #00ff00;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* 下载列表样式 */
.downloads-section {
    margin-top: 2rem;
}

.downloads-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
}

.downloads-summary h3 {
    margin: 0;
    font-size: 1.2rem;
}

.date-group {
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.date-header {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    color: white;
    padding: 0.75rem 1rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease;
}

.date-header:hover {
    background: linear-gradient(135deg, #81c3ff 0%, #1e90ff 100%);
}

.date-header .toggle-icon {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.date-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.date-content {
    padding: 1rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.date-content.collapsed {
    max-height: 0;
    padding: 0 1rem;
    opacity: 0;
}

.folder-group {
    margin-bottom: 1rem;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    background: #fafafa;
}

.folder-header {
    background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
    color: white;
    padding: 0.5rem 0.75rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.3s ease;
}

.folder-header:hover {
    background: linear-gradient(135deg, #00d2a4 0%, #00b894 100%);
}

.folder-header .toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.folder-header.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.folder-content {
    padding: 0.75rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.folder-content.collapsed {
    max-height: 0;
    padding: 0 0.75rem;
    opacity: 0;
}

/* 当前下载的文件夹高亮 */
.folder-group.current-download {
    border-color: #ffc107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

.folder-group.current-download .folder-header {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #333;
}

.folder-group.current-download .folder-header:hover {
    background: linear-gradient(135deg, #ffcd38 0%, #ffa726 100%);
}

.downloads-list {
    display: grid;
    gap: 15px;
}

.download-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.download-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #007bff;
}

.download-item:last-child {
    margin-bottom: 0;
}

.download-info {
    flex: 1;
    min-width: 0; /* 允许flex项目收缩 */
    overflow: hidden; /* 防止内容溢出 */
}

.download-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    align-items: flex-start;
}

.delete-file-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.delete-file-btn:hover:not(:disabled) {
    opacity: 1;
    transform: scale(1.05);
}

.delete-file-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.folder-actions {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0;
    padding: 0 0.75rem;
}

.delete-folder-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.delete-folder-btn:hover:not(:disabled) {
    background-color: #c82333;
    border-color: #bd2130;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.delete-folder-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background-color: #6c757d;
    border-color: #6c757d;
}

.file-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.file-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

.file-name {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    flex: 1;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.file-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    color: #666;
    text-align: left;
    justify-content: flex-start;
    align-items: flex-start;
}

.file-size, .file-date, .file-duration {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 搜索下载区域样式 */
.search-download {
    animation: fadeIn 0.3s ease;
}

.search-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.search-input-group input {
    flex: 1;
}

.search-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.search-results {
    margin-top: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.search-results-header h4 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selection-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.selected-count {
    font-weight: 600;
    color: #667eea;
}

.search-results-list {
    max-height: 600px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.search-result-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-result-item:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item.selected {
    background-color: #e3f2fd;
    border-left: 4px solid #667eea;
}

.search-result-checkbox {
    margin-right: 1rem;
    margin-top: 0.25rem;
}

.search-result-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.search-result-thumbnail {
    width: 120px;
    height: 90px;
    margin-right: 1rem;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.search-result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-channel {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.search-result-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #888;
}

.search-result-duration {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
    position: absolute;
    bottom: 0.25rem;
    right: 0.25rem;
}

.search-result-thumbnail {
    position: relative;
}

.search-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.search-loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #667eea;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.search-error {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
    background: #f8d7da;
    border-radius: 6px;
    margin: 1rem 0;
}

.search-empty {
    text-align: center;
    padding: 2rem;
    color: #666;
    background: #f8f9fa;
    border-radius: 6px;
}

/* 动态点点点效果 */
.dots {
    animation: dots 1.5s infinite;
    display: inline-block;
    width: 20px;
    text-align: left;
}

@keyframes dots {
    0%, 20% {
        content: '';
        opacity: 0;
    }
    25% {
        content: '.';
        opacity: 1;
    }
    50% {
        content: '..';
        opacity: 1;
    }
    75%, 100% {
        content: '...';
        opacity: 1;
    }
}

.dots::after {
    content: '...';
    animation: dotsContent 1.5s infinite;
}

@keyframes dotsContent {
    0%, 20% {
        content: '';
    }
    25% {
        content: '.';
    }
    50% {
        content: '..';
    }
    75%, 100% {
        content: '...';
    }
}

/* 连接状态样式 */
.connection-status {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.status-indicator.checking,
.connection-status.checking {
    color: #1a365d !important;
    background: linear-gradient(135deg, #e3f2fd 0%, #f8f9fa 50%, #e1f5fe 100%);
    background-size: 300% 300%;
    animation: gradientShift 2s ease-in-out infinite, breathe 3s ease-in-out infinite;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
    position: relative;
    font-weight: 600;
}

/* 确保checking状态文本颜色正确 */
.connection-status.checking #statusText {
    color: #1a365d !important;
    font-weight: 600;
}

.status-indicator.checking::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.2), transparent);
    animation: wave 2s infinite;
    border-radius: 6px;
}

.status-indicator.checking::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 8px;
    background: linear-gradient(45deg, 
        rgba(0, 123, 255, 0.1), 
        rgba(0, 123, 255, 0.05), 
        rgba(0, 123, 255, 0.1)
    );
    background-size: 200% 200%;
    animation: borderGlow 2s ease-in-out infinite;
    z-index: -1;
}

.status-indicator.checking i {
    animation: spinPulse 1.5s ease-in-out infinite;
    color: #007bff;
    filter: drop-shadow(0 0 3px rgba(0, 123, 255, 0.3));
}

.status-indicator.checking .dots {
    display: inline-flex;
    gap: 2px;
    margin-left: 4px;
}

.status-indicator.checking .dots::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #007bff;
    animation: dotPulse 1.5s infinite;
}

.status-indicator.checking .dots::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #007bff;
    animation: dotPulse 1.5s infinite 0.3s;
    margin-right: 2px;
}

.status-indicator.connected,
.connection-status.connected {
    color: #ffffff !important;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: 2px solid #20c997;
    animation: successSlide 0.6s ease-out;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(40, 167, 69, 0.25);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.status-indicator.connected i,
.connection-status.connected i {
    color: #ffffff !important;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

/* 确保连接状态文本颜色正确 */
.connection-status.connected #statusText {
    color: #ffffff !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.status-indicator.disconnected,
.connection-status.disconnected {
    color: #dc3545;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 1px solid #f5c6cb;
    animation: errorShake 0.6s ease-out;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

.status-indicator.error,
.connection-status.error {
    color: #fd7e14;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #ffeaa7;
    animation: warningBounce 0.6s ease-out;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.15);
}

/* 确保所有状态的文本颜色正确 */
.connection-status.disconnected #statusText {
    color: #dc3545 !important;
    font-weight: 600;
}

.connection-status.error #statusText {
    color: #fd7e14 !important;
    font-weight: 600;
}

/* 动画效果 */
@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes wave {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

@keyframes borderGlow {
    0%, 100% {
        background-position: 0% 50%;
        opacity: 0.5;
    }
    50% {
        background-position: 100% 50%;
        opacity: 1;
    }
}

@keyframes spinPulse {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes successSlide {
    0% {
        opacity: 0;
        transform: translateX(-20px) scale(0.9);
    }
    60% {
        transform: translateX(5px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes errorShake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-3px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(3px);
    }
}

@keyframes warningBounce {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    50% {
        transform: translateY(2px) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 翻页控制样式 */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    margin-top: 1rem;
}

.page-info {
    font-size: 0.9rem;
    color: #6c757d;
    min-width: 120px;
    text-align: center;
}

.pagination-controls .btn {
    min-width: 100px;
}

/* 改善搜索结果项的间距 */
.search-result-item {
    display: flex;
    align-items: flex-start;
    padding: 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    gap: 1rem; /* 添加整体间距 */
}

.search-result-checkbox {
    margin-right: 0; /* 移除右边距，使用gap */
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.search-result-thumbnail {
    width: 120px;
    height: 90px;
    margin-right: 0; /* 移除右边距，使用gap */
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.search-result-info {
    flex: 1;
    min-width: 0;
    padding-left: 0.5rem; /* 添加左边距 */
}

/* 搜索选项网格布局改进 */
.search-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

/* 搜索按钮样式 */
.search-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem;
}

.search-buttons button {
    min-width: 150px;
}

/* 自定义确认对话框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.25rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 80px;
}

/* 响应式改进 */
@media (max-width: 768px) {
    .search-result-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .search-result-checkbox {
        margin-right: 0;
        margin-bottom: 0;
        align-self: flex-start;
    }
    
    .search-result-thumbnail {
        width: 100%;
        height: 200px;
        margin-right: 0;
    }
    
    .search-result-info {
        padding-left: 0;
    }
    
    .pagination-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .pagination-controls .btn {
        width: 100%;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-options {
        grid-template-columns: 1fr;
    }
    
    .search-results-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .selection-controls {
        justify-content: space-between;
    }
    
    .search-result-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-result-checkbox {
        margin-right: 0;
        margin-bottom: 0.5rem;
        align-self: flex-start;
    }
    
    .search-result-thumbnail {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

.file-duration {
    color: #8b5cf6;
    font-weight: 500;
}

.file-path {
    font-size: 0.75rem;
    color: #888;
    font-style: italic;
}

.file-path small {
    word-break: break-all;
}

.download-info h4 {
    margin-bottom: 5px;
    color: #333;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    margin-top: 0;
}

.download-info p {
    color: #666;
    font-size: 14px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    margin: 0;
}

/* 下载文件列表中的文件名样式 */
.download-info h6.file-name {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 0.9rem;
    font-weight: 600;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.no-downloads {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* 气泡提示样式 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    pointer-events: none;
}

.toast {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 320px;
    max-width: 450px;
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--toast-color);
}

.toast.success {
    --toast-color: #10b981;
}

.toast.error {
    --toast-color: #ef4444;
}

.toast.warning {
    --toast-color: #f59e0b;
}

.toast.info {
    --toast-color: #3b82f6;
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.toast.success .toast-icon {
    background: #10b981;
}

.toast.error .toast-icon {
    background: #ef4444;
}

.toast.warning .toast-icon {
    background: #f59e0b;
}

.toast.info .toast-icon {
    background: #3b82f6;
}

.toast-content {
    flex: 1;
    color: #1f2937;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

.toast-close {
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--toast-color);
    transition: width linear;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* 旧的消息样式保持兼容 */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    margin-bottom: 20px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .checkbox-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        justify-content: center;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 滚动条样式 */
.log-container::-webkit-scrollbar {
    width: 8px;
}

.log-container::-webkit-scrollbar-track {
    background: #2a2a2a;
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* 日志高亮动画 */
@keyframes highlight {
    0% {
        background-color: rgba(255, 255, 0, 0.3);
        transform: scale(1);
    }
    50% {
        background-color: rgba(255, 255, 0, 0.6);
        transform: scale(1.02);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

/* 视频处理界面样式 */
.video-processing-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    animation: fadeIn 0.5s ease-out;
}

.processing-files {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.processing-files h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
}

.available-files {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    text-align: left;
}

.available-files .file-item {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    transition: background-color 0.2s;
    text-align: left;
}

.available-files .file-item:last-child {
    border-bottom: none;
}

.available-files .file-item:hover {
    background-color: #f5f5f5;
}

.available-files .file-info {
    flex: 1;
    text-align: left;
}

.available-files .file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
    text-align: left;
}

.available-files .file-details {
    font-size: 0.85rem;
    color: #666;
    text-align: left;
    display: block;
    width: 100%;
}

.available-files .no-files {
    padding: 2rem;
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 0;
}

.file-selection {
    margin: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
}

.file-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-item:hover {
    background: #f8f9fa;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.file-item input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.2);
}

.file-info {
    flex: 1;
    text-align: left;
}

.file-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-align: left;
}

.file-details {
    font-size: 0.85rem;
    opacity: 0.8;
    text-align: left;
}

.selected-files {
    margin-top: 1rem;
    padding: 1rem;
    background: #e8f5e8;
    border-radius: 6px;
    border: 1px solid #c3e6c3;
}

.selected-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.selected-file-tag {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.selected-file-tag .remove-file {
    cursor: pointer;
    font-weight: bold;
    opacity: 0.8;
}

.selected-file-tag .remove-file:hover {
    opacity: 1;
}

.processing-operations {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.operation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.operation-buttons .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.operation-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.workflow-container {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #dee2e6;
}

.operation-workflow {
    min-height: 200px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fafafa;
}

.workflow-step {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.workflow-step:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.workflow-step:last-child {
    margin-bottom: 0;
}

.step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.step-title {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.step-controls {
    display: flex;
    gap: 0.5rem;
}

.step-controls button {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 4px;
}

.step-params {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.param-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.param-group label {
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.param-group input,
.param-group select {
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* 串行模式信息提示 */
.serial-mode-info {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.serial-mode-info i {
    color: #2196f3;
    margin-top: 2px;
    flex-shrink: 0;
}

.serial-mode-info p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #1976d2;
}

.serial-mode-info p:first-of-type {
    font-weight: 500;
    margin-bottom: 4px;
}

.serial-mode-info p:last-of-type {
    font-size: 13px;
    opacity: 0.8;
}

/* 处理模式选择样式 */
.processing-mode {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.processing-mode .checkbox-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.processing-mode .mode-description {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    padding-left: 1.5rem;
}

.processing-mode .mode-description strong {
    color: #2c3e50;
}

/* 工作流控制按钮样式调整 */
.workflow-controls {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.processing-progress {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e0e0e0;
}

.progress-info {
    margin-bottom: 1.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.processing-log {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid #dee2e6;
}

.processing-results {
    background: #e8f5e8;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #c3e6c3;
}

.results-list {
    margin-bottom: 1.5rem;
}

.result-item {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.result-info {
    flex: 1;
}

.result-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.result-details {
    font-size: 0.85rem;
    color: #666;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.no-files,
.no-operations {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 2rem;
}

/* 操作参数模态框样式 */
.operation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

/* 视频处理相关样式 */
.merge-file-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    background-color: #f9f9f9;
}

.merge-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.merge-file-item:last-child {
    border-bottom: none;
}

.merge-file-item label {
    display: flex;
    align-items: center;
    margin: 0;
    cursor: pointer;
}

.merge-file-item input[type="checkbox"] {
    margin-right: 8px;
}

.merge-order {
    font-size: 12px;
    color: #666;
    font-weight: bold;
}

.selected-file {
    padding: 8px 12px;
    background-color: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 4px;
    color: #1976d2;
    font-weight: 500;
    word-break: break-all;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.param-group small {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 12px;
}

#opacityValue {
    margin-left: 8px;
    font-weight: bold;
    color: #333;
}

.step-params {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* 缩放模式切换 */
#dimensionsMode, #ratioMode {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fafafa;
}

/* 水印类型切换 */
#textWatermark, #imageWatermark {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fafafa;
}

/* 范围输入样式 */
input[type="range"] {
    width: 100%;
    margin: 5px 0;
}

/* 文件选择下拉框样式 */
#targetFile {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

#targetFile:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .operation-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .step-params {
        grid-template-columns: 1fr;
    }
    
    .workflow-controls {
        flex-direction: column;
    }
    
    .result-actions {
        flex-direction: column;
    }
    
    /* 操作模态框响应式 */
    .modal-content {
        max-width: 95%;
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .modal-header {
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    /* 文件选择器响应式 */
    .file-selector-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .file-view-modes {
        justify-content: center;
    }
    
    .view-mode-btn {
        flex: 1;
        max-width: 80px;
    }
    
    .file-search-container {
        max-width: none;
    }
    
    .file-count {
        text-align: center;
    }
    
    .file-option-content {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .file-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .file-name {
        font-size: 14px;
    }
    
    .file-meta {
        font-size: 11px;
    }
    
    /* 树形视图响应式 */
    .tree-folder {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .tree-content {
        margin-left: 15px;
    }
    
    .tree-file .file-option-content {
        padding: 8px 12px;
    }
    
    /* 关键字分组响应式 */
    .keyword-group-header {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .keyword-count {
        font-size: 11px;
        padding: 1px 6px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 98%;
        padding: 1rem;
        margin: 0.5rem;
    }
    
    /* 文件选择器小屏幕优化 */
    .file-selector-header {
        padding: 8px 12px;
    }
    
    .view-mode-btn {
        padding: 6px 8px;
        min-width: 32px;
        font-size: 12px;
    }
    
    .file-option-content {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .file-icon {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .file-name {
        font-size: 13px;
    }
    
    .file-meta {
        font-size: 10px;
    }
    
    .tree-folder {
        padding: 4px 8px;
        font-size: 13px;
    }
    
    .keyword-group-header {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* 自定义确认对话框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: modalFadeIn 0.3s ease-out;
}

.modal-overlay .modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    animation: modalSlideIn 0.3s ease-out forwards;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-overlay .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    margin-bottom: 0;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
}

.modal-overlay .modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-overlay .modal-header h3::before {
    content: '⚠️';
    font-size: 1.5rem;
}

.modal-overlay .modal-body {
    padding: 2rem;
    margin-bottom: 0;
}

.modal-overlay .modal-body p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    text-align: center;
}

.modal-overlay .modal-footer {
    padding: 1.5rem 2rem 2rem;
    margin: 0;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    display: flex;
    gap: 1rem;
    justify-content: center;
    border-radius: 0 0 16px 16px;
}

.modal-overlay .modal-footer .btn {
    min-width: 100px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.modal-overlay .modal-footer .btn-secondary {
    background: #6c757d;
    color: white;
}

.modal-overlay .modal-footer .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.modal-overlay .modal-footer .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-overlay .modal-footer .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* 模态框动画 */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* 响应式模态框 */
@media (max-width: 480px) {
    .modal-overlay .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-overlay .modal-header,
    .modal-overlay .modal-body,
    .modal-overlay .modal-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .modal-overlay .modal-footer {
        flex-direction: column;
    }
    
    .modal-overlay .modal-footer .btn {
        width: 100%;
    }
}

/* 文件展示模式选择器 */
.display-mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    flex-wrap: wrap;
}

.display-mode-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    white-space: nowrap;
}

.display-mode-option:hover {
    background: #e9ecef;
}

.display-mode-option input[type="radio"] {
    display: none;
}

.display-mode-option input[type="radio"]:checked + .display-mode-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.display-mode-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9rem;
}

.display-mode-label i {
    font-size: 1rem;
}

/* 搜索分组样式 */
.search-group {
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 600;
}

.search-header:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

.search-header.collapsed {
    background: #6c757d;
}

.search-content {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.search-content.collapsed {
    display: none;
}

.search-info {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.search-info small {
    color: #666;
    font-size: 0.85rem;
}

/* 日期子分组样式 */
.date-subgroup {
    margin-bottom: 1rem;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    overflow: hidden;
    background: white;
}

.date-subheader {
    background: #e9ecef;
    color: #495057;
    padding: 0.75rem 1rem;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.date-subheader:hover {
    background: #dee2e6;
}

.date-subheader.collapsed {
    background: #ced4da;
}

.date-subcontent {
    padding: 0.75rem;
    background: #fafafa;
    border-top: 1px solid #d0d0d0;
    transition: all 0.3s ease;
}

.date-subcontent.collapsed {
    display: none;
}

/* 文件状态指示器 */
.file-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.file-status:contains("存在") {
    background: #d4edda;
    color: #155724;
}

.file-status:contains("已删除") {
    background: #f8d7da;
    color: #721c24;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .display-mode-selector {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .display-mode-option {
        justify-content: center;
    }
    
    .search-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .search-content {
        padding: 0.75rem;
    }
    
    .date-subheader {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .date-subcontent {
        padding: 0.5rem;
    }
}

/* 产出物管理样式 */
.output-management {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.output-management h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.output-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.outputs-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

.no-outputs {
    text-align: center;
    color: #666;
    padding: 2rem;
    margin: 0;
    font-style: italic;
}

.output-item {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.output-item:last-child {
    border-bottom: none;
}

.output-item:hover {
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.output-info {
    flex: 1;
}

.output-filename {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    word-break: break-all;
    font-size: 0.95rem;
}

.output-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.output-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.output-operations {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 0.75rem;
}

.output-operations-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.operations-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.operation-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.operation-tag i {
    font-size: 0.7rem;
}

.output-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.output-actions .btn {
    padding: 0.5rem;
    min-width: auto;
    border-radius: 6px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.output-actions .btn i {
    font-size: 0.9rem;
}

.btn-download {
    background: #28a745;
    color: white;
    border: none;
}

.btn-download:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.btn-info {
    background: #17a2b8;
    color: white;
    border: none;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* 产出物详情模态框 */
.output-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.output-detail-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.output-detail-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.output-detail-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.output-detail-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.output-detail-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.output-detail-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section h4 {
    margin: 0 0 0.75rem 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-content {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid #e0e0e0;
}

.detail-content p {
    margin: 0 0 0.5rem 0;
    color: #555;
    font-size: 0.9rem;
}

.detail-content p:last-child {
    margin-bottom: 0;
}

.operation-detail {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.operation-detail:last-child {
    margin-bottom: 0;
}

.operation-detail h5 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.operation-params {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .output-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .output-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .output-actions {
        align-self: flex-end;
    }
    
    .output-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .operations-list {
        gap: 0.25rem;
    }
    
    .operation-tag {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
    
    .output-detail-content {
        width: 95%;
        margin: 1rem;
    }
    
    .output-detail-header {
        padding: 1rem 1.5rem;
    }
    
    .output-detail-body {
        padding: 1.5rem;
    }
}

/* 第二套Toast样式 - 直接添加到body的toast */
body > .toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    min-width: 320px;
    max-width: 450px;
    display: flex;
    align-items: center;
    gap: 16px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    pointer-events: auto;
}

body > .toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--toast-color);
}

body > .toast.show {
    transform: translateX(0);
    opacity: 1;
}

body > .toast.success {
    --toast-color: #10b981;
}

body > .toast.error {
    --toast-color: #ef4444;
}

body > .toast.warning {
    --toast-color: #f59e0b;
}

body > .toast.info {
    --toast-color: #3b82f6;
}

body > .toast i {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body > .toast.success i {
    background: #10b981;
}

body > .toast.error i {
    background: #ef4444;
}

body > .toast.warning i {
    background: #f59e0b;
}

body > .toast.info i {
    background: #3b82f6;
}

body > .toast span {
    flex: 1;
    color: #1f2937;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
}

/* 多个toast的堆叠效果 */
body > .toast:nth-child(n+2) {
    margin-top: 16px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    body > .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100%);
    }
    
    body > .toast.show {
        transform: translateY(0);
    }
}

/* 文件加载状态样式 */
.loading-state, .error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p, .error-state p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

.btn-retry {
    margin-top: 15px;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-retry:hover {
    background-color: #0056b3;
}

.error-state p {
    color: #dc3545;
    margin-bottom: 10px;
}

/* 文件选择器样式 */
.file-selector {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.file-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* 视图模式切换按钮 */
.file-view-modes {
    display: flex;
    gap: 4px;
    background: white;
    border-radius: 6px;
    padding: 2px;
    border: 1px solid #e0e0e0;
}

.view-mode-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

.view-mode-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.view-mode-btn.active {
    background: #2196f3;
    color: white;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.file-search-container {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.file-search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.file-search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.file-search-container i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
}

.file-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.file-selector-body {
    max-height: 500px;
    overflow-y: auto;
    padding: 0 0;

/* 隐藏添加背景视频按钮 */
button[data-operation="backgroundVideo"] {
    display: none !important;
}
    flex: 1;
    text-align: left;
}

/* 树形模式选择器样式 - 固定在顶部 */
.tree-mode-selector {
    margin: 0;
    padding: 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 9;
}

.file-option {
    padding: 0;
    margin: 4px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #ffffff;
}

.file-option:last-child {
    margin-bottom: 8px;
}

.file-option:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 合并文件选择器模态框样式 */
#mergeFileSelectModal {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
}

#mergeFileSelectModal .modal-dialog {
    margin: 0;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
}

#mergeFileSelectModal .modal-content {
    height: auto;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

#mergeFileSelectModal .modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: 60vh;
}

/* 改进的文件选择器多选样式 */
.file-option.selected {
    background-color: #e3f2fd !important;
    border-color: #2196f3 !important;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2);
}

.file-option.selected .file-select-indicator {
    background: #2196f3 !important;
    border-color: #2196f3 !important;
    color: white !important;
    transform: scale(1.1);
}

.file-option.selected .file-select-indicator i {
    display: block;
}

.file-option .file-select-indicator i {
    display: none;
}

/* 选中文件预览样式 */
.selected-merge-files-preview {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.selected-merge-files-preview h6 {
    margin-bottom: 10px;
    color: #495057;
    font-weight: 600;
}

.selected-file-preview {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    gap: 10px;
}

.selected-file-preview:last-child {
    margin-bottom: 0;
}

.selected-file-preview .file-order {
    width: 24px;
    height: 24px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
}

.selected-file-preview .file-name {
    flex: 1;
    font-size: 14px;
    color: #495057;
    word-break: break-all;
}

.selected-file-preview .btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* 无选择状态样式 */
.no-selection {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
}

.file-option.selected {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.file-option.selected .file-select-indicator {
    background: #2196f3;
    border-color: #2196f3;
    color: white;
}

.file-option.selected .file-select-indicator i {
    display: block;
}

.file-option.recommended {
    background-color: #fff3cd;
    border-color: #ffc107;
}

.file-option.recommended.selected {
    background-color: #fff3cd;
    border-color: #ffc107;
}

.file-option-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    text-align: left;
}

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #666;
    font-size: 16px;
    flex-shrink: 0;
}

.file-option.recommended .file-icon {
    background: #ffc107;
    color: white;
}

.file-option.selected .file-icon {
    background: #2196f3;
    color: white;
}

.file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    align-items: flex-start;
}

.file-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    word-break: break-all;
    line-height: 1.4;
    margin: 0;
    text-align: left;
    width: 100%;
    align-self: flex-start;
}

.file-meta {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
    margin: 0;
    opacity: 0.9;
    text-align: left;
    width: 100%;
    align-self: flex-start;
}

.file-select-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.file-option.selected .file-select-indicator {
    background: #2196f3;
    border-color: #2196f3;
    color: white;
}

.file-option.recommended .file-select-indicator {
    background: #ffc107;
    border-color: #ffc107;
    color: white;
}

.file-selector-footer {
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.selected-file-info {
    font-size: 14px;
    color: #666;
}

.selected-text {
    font-weight: 500;
}

/* 树形视图样式 */
.tree-node {
    margin-bottom: 4px;
}

.tree-folder {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    gap: 8px;
    font-weight: 500;
    color: #333;
}

.tree-folder:hover {
    background-color: #f8f9fa;
}

.tree-toggle-icon {
    transition: transform 0.2s;
    color: #666;
    font-size: 12px;
    width: 12px;
}

.tree-node.collapsed .tree-toggle-icon {
    transform: rotate(-90deg);
}

.tree-node.collapsed .tree-content {
    display: none;
}

.folder-icon {
    color: #ffc107;
    font-size: 16px;
}

.folder-name {
    flex: 1;
}

.folder-count {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.tree-content {
    border-left: 2px solid #f0f0f0;
    margin-left: 20px;
}

.tree-file {
    border-left: none;
}

/* 树形模式选择器内容样式 */
.tree-mode-options {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.tree-mode-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9em;
    color: #495057;
}

.tree-mode-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.tree-mode-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: #ffffff;
}

.tree-mode-btn i {
    font-size: 0.9em;
}

.tree-mode-description {
    font-size: 0.85em;
    color: #6c757d;
    font-style: italic;
}

/* 目录结构特殊样式 */
.directory-node {
    border-left: 2px solid #e9ecef;
    margin-left: 10px;
    padding-left: 10px;
}

.directory-folder {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
}

.directory-folder:hover {
    background: #ffeaa7;
}

.directory-file {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.folder-stats {
    font-size: 0.85em;
    color: #6c757d;
    margin-left: 8px;
}

/* 加载和错误状态样式 */
.loading-state, .error-state, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.loading-state i {
    font-size: 2em;
    margin-bottom: 12px;
    color: #007bff;
}

.error-state i {
    font-size: 2em;
    margin-bottom: 12px;
    color: #dc3545;
}

.empty-state i {
    font-size: 2em;
    margin-bottom: 12px;
    color: #6c757d;
}

.loading-state span, .error-state p, .empty-state p {
    margin: 0;
    font-size: 1.1em;
}

/* 加载状态样式 */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #666;
    font-size: 14px;
}

.loading-state i {
    margin-right: 8px;
    color: #007bff;
}

/* 错误状态样式 */
.error-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #dc3545;
    font-size: 14px;
}

.error-state i {
    margin-right: 8px;
}

/* 关键字分组样式 */
.keyword-group {
    margin-bottom: 8px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.keyword-group-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    cursor: pointer;
    transition: background-color 0.2s;
    gap: 8px;
    font-weight: 500;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.keyword-group-header:hover {
    background-color: #e9ecef;
}

.group-toggle-icon {
    transition: transform 0.2s;
    color: #666;
    font-size: 12px;
    width: 12px;
}

.keyword-group.collapsed .group-toggle-icon {
    transform: rotate(-90deg);
}

.keyword-group.collapsed .keyword-group-content {
    display: none;
}

.keyword-icon {
    color: #2196f3;
    font-size: 14px;
}

.keyword-name {
    flex: 1;
}

.keyword-count {
    font-size: 12px;
    color: #666;
    font-weight: normal;
    background: white;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.keyword-group-content {
    background: white;
}

.keyword-group-content .file-option {
    border-bottom: 1px solid #f8f9fa;
    margin: 0;
}

.keyword-group-content .file-option:last-child {
    border-bottom: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .file-selector-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .file-search-container {
        max-width: none;
    }
    
    .file-count {
        text-align: center;
    }
    
    .file-option-content {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .file-icon {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .file-name {
        font-size: 14px;
    }
    
    .file-meta {
         font-size: 11px;
     }
 }

/* 合并文件选择器样式 */
.merge-file-selector {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    overflow: hidden;
}

.merge-file-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.merge-file-selector-body {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px 0;
}

.merge-file-option {
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.merge-file-option:last-child {
    border-bottom: none;
}

.merge-file-option:hover {
    background-color: #f8f9fa;
}

.merge-file-option.selected {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.merge-file-option-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.merge-file-option .file-icon.previous-output {
    background: #28a745;
    color: white;
}

.merge-file-option.selected .file-icon.previous-output {
    background: #28a745;
    color: white;
}

.merge-file-select-indicator {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.merge-file-option.selected .merge-file-select-indicator {
    background: #2196f3;
    border-color: #2196f3;
    color: white;
}

.merge-order-indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffc107;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-left: 8px;
    flex-shrink: 0;
}

.merge-file-selector-footer {
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.selected-files-info {
    font-size: 14px;
    color: #666;
}

/* 合并文件选择器模态框样式 */
.merge-file-selector-info {
    margin-bottom: 20px;
}

.selected-merge-files-preview {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.selected-merge-files-preview h6 {
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.selected-files-list {
    max-height: 200px;
    overflow-y: auto;
}

.no-selection {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.selected-file-preview {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    gap: 12px;
}

.selected-file-preview:last-child {
    margin-bottom: 0;
}

.selected-file-preview .file-order {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2196f3;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    flex-shrink: 0;
}

.selected-file-preview .file-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    word-break: break-all;
}

.selected-file-preview .btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* 文件选择器多选模式样式 */
.file-option.selected {
    background-color: #e3f2fd !important;
    border-left: 4px solid #2196f3;
}

.file-option.selected .file-select-indicator {
    background: #2196f3;
    border-color: #2196f3;
    color: white;
}

.file-option.selected .file-select-indicator i {
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .merge-file-selector-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .merge-file-option-content {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .selected-file-preview {
        padding: 6px 10px;
        gap: 8px;
    }
    
    .selected-file-preview .file-name {
        font-size: 13px;
    }
}

/* 视频预览样式 */
.video-preview-container {
    margin: 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    overflow: hidden;
}

.video-preview-header {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-preview-title {
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-preview-title i {
    color: #2196f3;
}

.video-info {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 16px;
}

.video-preview-content {
    padding: 16px;
}

.video-preview-image {
    position: relative;
    display: inline-block;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    background: #f8f9fa;
}

.video-preview-image img {
    display: block;
    max-width: 100%;
    height: auto;
}

.selection-canvas {
    position: absolute;
    top: 0;
    left: 0;
    cursor: crosshair;
    z-index: 10;
}

.selection-box {
    position: absolute;
    border: 2px dashed #ff4444;
    background: rgba(255, 68, 68, 0.1);
    pointer-events: none;
}

.mosaic-selection-modes {
    margin: 16px 0;
    display: flex;
    gap: 16px;
    align-items: center;
}

.mode-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.mode-option:hover {
    background: #f8f9fa;
    border-color: #2196f3;
}

.mode-option.active {
    background: #e3f2fd;
    border-color: #2196f3;
    color: #1976d2;
}

.mode-option input[type="radio"] {
    margin: 0;
}

.preview-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.preview-loading i {
    font-size: 24px;
    margin-bottom: 12px;
    color: #2196f3;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.preview-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

.preview-error i {
    font-size: 24px;
    margin-bottom: 12px;
}

.selection-instructions {
    margin-top: 12px;
    padding: 12px;
    background: #e8f4fd;
    border-left: 4px solid #2196f3;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    color: #1976d2;
}

.coordinates-display {
    margin-top: 12px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    color: #666;
    border: 1px solid #e0e0e0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .video-preview-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .video-info {
        flex-direction: column;
        gap: 4px;
    }
    
    .mosaic-selection-modes {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .mode-option {
        width: 100%;
        justify-content: flex-start;
    }
}

/* 日志头部样式 */
.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.log-header h5 {
    margin: 0;
    color: var(--text-color);
}

.log-header .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* 响应式设计 - 日志头部 */
@media (max-width: 768px) {
    .log-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .log-header .btn {
        align-self: flex-end;
    }
}

/* 合并文件选择器样式 */
.merge-files-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    overflow: hidden;
}

.selected-merge-files {
    min-height: 120px;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border-bottom: 1px solid #e0e0e0;
}

.merge-files-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: #999;
    text-align: center;
    padding: 20px;
}

.merge-files-placeholder i {
    font-size: 24px;
    margin-bottom: 8px;
    color: #ccc;
}

.selected-file-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.selected-file-item:hover {
    background: #f8f9fa;
}

.selected-file-item:last-child {
    border-bottom: none;
}

.file-order {
    width: 32px;
    height: 32px;
    background: #2196f3;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
}

.selected-file-item .file-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.selected-file-item .file-info i {
    color: #666;
    flex-shrink: 0;
}

.selected-file-item .file-name {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.file-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1;
    min-width: auto;
}

.merge-files-actions {
    padding: 12px 16px;
    background: #f8f9fa;
    display: flex;
    gap: 8px;
}

.merge-files-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* 响应式设计 - 合并文件选择器 */
@media (max-width: 768px) {
    .selected-file-item {
        padding: 10px 12px;
    }
    
    .file-order {
        width: 28px;
        height: 28px;
        font-size: 12px;
        margin-right: 8px;
    }
    
    .selected-file-item .file-name {
        font-size: 14px;
    }
    
    .file-actions .btn {
        padding: 3px 6px;
        font-size: 11px;
    }
    
    .merge-files-actions {
        padding: 10px 12px;
        flex-direction: column;
    }
    
    .merge-files-actions .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* 文件选择模态框样式 */
.file-select-modal {
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.file-select-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    max-height: calc(90vh - 120px);
}

/* 搜索框样式 */
.file-search-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 0.75rem;
    color: #6c757d;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 文件列表容器 */
.file-list-container {
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
}

.file-select-list {
    padding: 0;
}

.file-select-list .no-files {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
    margin: 0;
}

/* 文件项样式 */
.file-select-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-select-item:last-child {
    border-bottom: none;
}

.file-select-item:hover {
    background-color: #f8f9fa;
}

.file-select-item.selected {
    background-color: #e3f2fd;
    border-left: 3px solid #007bff;
}

.file-select-item input[type="checkbox"],
.file-select-item input[type="radio"] {
    margin-right: 0.75rem;
    transform: scale(1.1);
}

.file-item-icon {
    margin-right: 0.75rem;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.file-item-icon.video { color: #ff6b6b; }
.file-item-icon.audio { color: #4ecdc4; }
.file-item-icon.image { color: #45b7d1; }
.file-item-icon.other { color: #96ceb4; }

.file-item-info {
    flex: 1;
    min-width: 0;
}

.file-item-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.file-item-details {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    gap: 1rem;
}

/* 文件类型筛选 */
.file-filter-container {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.file-filter-container h5 {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    color: #495057;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-option {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-option input {
    margin-right: 0.5rem;
}

/* 排序选项 */
.sort-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.sort-options label {
    font-size: 0.9rem;
    color: #495057;
    margin: 0;
}

.sort-select {
    padding: 0.25rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: white;
}

/* 关闭按钮 */
.close-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s, background-color 0.2s;
}

.close-btn:hover {
    color: #495057;
    background-color: #f8f9fa;
}

/* 响应式设计 - 文件选择模态框 */
@media (max-width: 768px) {
    .file-select-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .file-search-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-options {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .file-item-details {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .sort-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* 合并文件容器样式 */
.merge-files-container {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.merge-files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.merge-files-header h4 {
    margin: 0;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
}

.merge-files-header .file-count {
    font-size: 14px;
    color: #6c757d;
    background-color: #e9ecef;
    padding: 4px 8px;
    border-radius: 12px;
}

.selected-merge-files {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.merge-files-placeholder {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    font-style: italic;
}

.selected-file-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.selected-file-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.file-order {
    width: 30px;
    height: 30px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 12px;
    flex-shrink: 0;
}

.file-info {
    flex: 1;
    display: flex;
    align-items: center;
    min-width: 0;
}

.file-info i {
    margin-right: 8px;
    color: #6c757d;
    font-size: 16px;
}

.file-name {
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-actions {
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.file-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
    min-width: auto;
}

.merge-files-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

.merge-files-actions .btn {
    padding: 6px 12px;
    font-size: 14px;
}

/* 响应式设计 - 合并文件容器 */
@media (max-width: 768px) {
    .merge-files-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .selected-file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .file-order {
        align-self: flex-start;
    }
    
    .file-actions {
        align-self: flex-end;
    }
    
    .merge-files-actions {
        flex-direction: column;
    }
}

/* 背景图片管理样式 */
.background-images-container {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.selected-background-images {
    min-height: 120px;
    max-height: 300px;
    overflow-y: auto;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
}

.background-images-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 120px;
    color: #999;
    text-align: center;
    padding: 20px;
}

.background-images-placeholder i {
    font-size: 24px;
    margin-bottom: 8px;
    color: #ccc;
}

.selected-image-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s ease;
    gap: 12px;
}

.selected-image-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.selected-image-item:last-child {
    margin-bottom: 0;
}

.image-order {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.image-preview-small {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    flex-shrink: 0;
    background: #f8f9fa;
}

.image-preview-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-info {
    flex: 1;
    min-width: 0;
}

.image-name {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.image-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.image-actions .btn {
    padding: 6px 8px;
    font-size: 12px;
    min-width: auto;
    border-radius: 4px;
}

.background-images-actions {
    margin-top: 1rem;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.background-images-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
}

/* 图片选择模态框样式 */
.image-select-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    cursor: pointer;
    gap: 12px;
}

.image-select-item:hover {
    background: #f8f9fa;
}

.image-select-item:last-child {
    border-bottom: none;
}

.image-preview {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
    flex-shrink: 0;
    background: #f8f9fa;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-select-checkbox {
    flex-shrink: 0;
}

.image-select-checkbox input[type="checkbox"] {
    transform: scale(1.2);
}

/* 响应式设计 - 背景图片 */
@media (max-width: 768px) {
    .selected-image-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
    }
    
    .image-preview-small {
        width: 50px;
        height: 50px;
    }
    
    .image-order {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .image-actions {
        align-self: flex-end;
    }
    
    .background-images-actions {
        flex-direction: column;
    }
    
    .image-preview {
        width: 60px;
        height: 60px;
    }
}

/* 设置弹窗样式 */
.settings-modal {
    max-width: 500px;
    width: 90%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.settings-modal.show {
    opacity: 1;
}

.settings-modal .modal-content {
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.settings-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.settings-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.settings-modal .modal-header h3 {
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.settings-modal .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.settings-section {
    margin-bottom: 2rem;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h4 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.setting-item {
    margin-bottom: 1.5rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.5rem;
}

.setting-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.setting-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.setting-description {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #667eea;
}

/* 响应式设计 - 设置弹窗 */
@media (max-width: 768px) {
    .settings-modal {
        width: 95%;
        max-width: none;
    }
    
    .settings-modal .modal-header {
        padding: 1rem;
    }
    
    .settings-modal .close-btn {
        top: 0.75rem;
        right: 0.75rem;
        width: 28px;
        height: 28px;
    }
    
    .settings-section h4 {
        font-size: 1rem;
    }
    
    .setting-input {
        padding: 0.6rem;
    }
}

/* 文件清理弹窗样式 */
.cleanup-modal {
    max-width: 600px;
    width: 90%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cleanup-modal.show {
    opacity: 1;
}

.cleanup-modal .modal-content {
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease;
}

.cleanup-modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.cleanup-modal .modal-header {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.cleanup-modal .modal-header h3 {
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cleanup-modal .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cleanup-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.cleanup-section {
    margin-bottom: 1.5rem;
}

.cleanup-section h4 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.cleanup-description {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    color: #856404;
    font-size: 0.95rem;
}

.cleanup-options {
    margin-top: 1rem;
}

.date-selector {
    margin-bottom: 1.5rem;
}

.date-selector label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.5rem;
}

.cleanup-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.cleanup-input:focus {
    outline: none;
    border-color: #f39c12;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.date-description {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #f39c12;
}

.cleanup-preview {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.cleanup-preview h5 {
    color: #333;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.preview-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #555;
    background: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.stat-item i {
    color: #f39c12;
}

.preview-list {
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.5rem;
}

.preview-file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
}

.preview-file-item:last-child {
    border-bottom: none;
}

.preview-file-item i {
    color: #666;
    width: 16px;
}

.file-operations {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* 响应式设计 - 文件清理弹窗 */
@media (max-width: 768px) {
    .cleanup-modal {
        width: 95%;
        max-width: none;
    }
    
    .cleanup-modal .modal-header {
        padding: 1rem;
    }
    
    .cleanup-modal .close-btn {
        top: 0.75rem;
        right: 0.75rem;
        width: 28px;
        height: 28px;
    }
    
    .cleanup-section h4 {
        font-size: 1rem;
    }
    
    .cleanup-input {
        padding: 0.6rem;
    }
    
    .preview-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .file-operations {
        flex-direction: column;
    }
    
    .file-operations .btn {
        width: 100%;
    }
}

/* 背景图预览模态框 */
.background-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.background-preview-content {
    background: white;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.background-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.background-preview-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
}

.background-preview-header h3 i {
    margin-right: 8px;
    color: #007bff;
}

.background-preview-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.background-preview-close:hover {
    background: #f0f0f0;
    color: #333;
}

.background-preview-body {
    padding: 20px;
    text-align: center;
}

.background-preview-image-container {
    margin-bottom: 15px;
}

.background-preview-image {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.background-preview-image:hover {
    transform: scale(1.02);
}

.background-preview-info h4 {
    margin: 10px 0 5px 0;
    color: #333;
    font-size: 16px;
}

.background-preview-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 移动端适配 - 背景图预览 */
@media (max-width: 768px) {
    .background-preview-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .background-preview-header {
        padding: 15px;
    }
    
    .background-preview-header h3 {
        font-size: 16px;
    }
    
    .background-preview-body {
        padding: 15px;
    }
    
    .background-preview-image {
        max-height: 50vh;
    }
}

/* 元数据状态显示 */
.metadata-status {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border: 1px solid #90caf9;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #1565c0;
}

.metadata-status-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.metadata-status-info i {
    color: #1976d2;
    font-size: 16px;
}

/* 加载状态样式 */
.saved-link-item.loading {
    opacity: 0.8;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.saved-link-item .loading-text {
    color: #6c757d;
    font-style: italic;
}

.saved-link-item .error-text {
    color: #dc3545;
    font-weight: 500;
}

.saved-link-item.loading .saved-link-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.saved-links {
    animation: fadeIn 0.3s ease;
}

.add-links-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
}

.add-links-section textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.add-links-section textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.tag-input-section {
    margin-top: 1rem;
}

.tag-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.tag-input-group input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.tag-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.view-mode-selector {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.view-mode-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: white;
    border: 2px solid #e0e0e0;
    min-width: 150px;
    justify-content: center;
}

.view-mode-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.view-mode-option input[type="radio"] {
    display: none;
}

.view-mode-option input[type="radio"]:checked + .view-mode-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.view-mode-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}

.tag-filter {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.filter-header h3 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tag-item:hover {
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.tag-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.tag-count {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag-item.active .tag-count {
    background: rgba(255, 255, 255, 0.2);
}

.saved-links-list {
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.saved-links-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.saved-links-header h3 {
    margin: 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.list-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.saved-links-container {
    max-height: 600px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ccc;
}

.empty-state p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.saved-link-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
    position: relative;
}

.saved-link-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.saved-link-item:last-child {
    border-bottom: none;
}

.saved-link-item.selected {
    background-color: #e3f2fd;
    border-left: 4px solid #667eea;
}

.saved-link-checkbox {
    margin-right: 1rem;
    margin-top: 0.25rem;
}

.saved-link-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.saved-link-thumbnail {
    width: 120px;
    height: 90px;
    margin-right: 1rem;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.saved-link-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.saved-link-info {
    flex: 1;
    min-width: 0;
}

.saved-link-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.saved-link-channel {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.saved-link-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}

.saved-link-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.saved-link-url {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #888;
    word-break: break-all;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.saved-link-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-left: 1rem;
}

.saved-link-actions .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    min-width: 80px;
}

/* 响应式设计 - 记录链接 */
@media (max-width: 768px) {
    .view-mode-selector {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .view-mode-option {
        min-width: auto;
    }
    
    .tag-input-group {
        flex-direction: column;
    }
    
    .list-controls {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .saved-link-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .saved-link-checkbox {
        margin: 0;
        align-self: flex-start;
    }
    
    .saved-link-thumbnail {
        width: 100%;
        height: 200px;
        margin: 0;
    }
    
    .saved-link-actions {
        flex-direction: row;
        margin: 0;
    }
    
    .tag-list {
        justify-content: center;
    }
}

/* 标签组样式 */
.tag-group {
    margin-bottom: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.tag-group-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
}

.tag-group-header .tag-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-group-header .tag-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
}

.tag-group-content {
    padding: 0;
}

.tag-group .saved-link-item {
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
}

.tag-group .saved-link-item:last-child {
    border-bottom: none;
}

.tag-group .saved-link-item:hover {
    background-color: #f8f9fa;
}

.tag-group .saved-link-item.selected {
    background-color: #e3f2fd;
    border-left: 4px solid #667eea;
}

/* 标签组响应式设计 */
@media (max-width: 768px) {
    .tag-group-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .tag-group-header .tag-count {
        align-self: flex-end;
    }
}

/* 视频详细信息样式 */
.video-details {
    margin-top: 5px;
    font-size: 0.85em;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.video-details span {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
}

/* 文件详情中的视频信息样式 */
.file-details .video-details {
    margin-top: 3px;
    margin-left: 0;
}

.file-details .video-details span {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: 1px solid rgba(0, 123, 255, 0.2);
}

/* 文件元信息中的视频详情样式 */
.file-meta span:not(:first-child) {
    margin-left: 5px;
}

.file-item-details span {
    margin-right: 8px;
    padding: 2px 4px;
    background: #f8f9fa;
    border-radius: 3px;
    font-size: 0.8em;
}

.file-item-details span:last-child {
    margin-right: 0;
}